Unexpected token }

Posted by tann98 on Stack Overflow See other posts from Stack Overflow or by tann98
Published on 2010-12-20T16:19:21Z Indexed on 2010/12/21 16:54 UTC
Read the original article Hit count: 187

Filed under:
|

i have a script, to open a model window, but it wont work. google chrome give me "Uncaught SyntaxError: Unexpected token }", but on a line that doesnt even have a closing curly brace.

here is my script:

function showm(id1){
  window.onscroll=function(){document.getElementById(id1).style.top=document.body.scrollTop;};
  document.getElementById(id1).style.display="block";
  document.getElementById(id1).style.top=document.body.scrollTop;
}

does anybody have any ideas on this? any help is appreciated.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about syntax